
public class StringSort {
	public static void main(String[] args){
		String numberStr ="20 89 23 -9";
		String[] strs = numberStr.split(" ");
		
		int[] numbers = new int[strs.length];
		
		for(int i=0;i<numbers.length;i++){
			numbers[i] = Integer.parseInt(strs[i]);
		}
		for(int i=0;i<numbers.length;i++){
			System.out.println(numbers[i]+" ");
		}
		System.out.println();
		
		
		for(int i=0;i<numbers.length;i++){
			for(int j=1;j<numbers.length -i-1;j++){
				if(numbers[j]>numbers[j+1]){
					int temp = numbers[j+1];
					numbers[j+1]=temp;
					
				}
			}
		}
		for(int i=0;i<numbers.length;i++){
			System.out.println(numbers[i]+" ");
		}
		System.out.println();
		
	}

}
